package com.ruoyi.asset.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.asset.mapper.AssetDepreciationMapper;
import com.ruoyi.asset.domain.AssetDepreciation;
import com.ruoyi.asset.service.IAssetDepreciationService;

/**
 * 资产折旧数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-12
 */
@Service
public class AssetDepreciationServiceImpl implements IAssetDepreciationService 
{
    @Autowired
    private AssetDepreciationMapper assetDepreciationMapper;

    /**
     * 查询资产折旧数据
     * 
     * @param id 资产折旧数据主键
     * @return 资产折旧数据
     */
    @Override
    public AssetDepreciation selectAssetDepreciationById(Long id)
    {
        return assetDepreciationMapper.selectAssetDepreciationById(id);
    }

    /**
     * 查询资产折旧数据列表
     * 
     * @param assetDepreciation 资产折旧数据
     * @return 资产折旧数据
     */
    @Override
    public List<AssetDepreciation> selectAssetDepreciationList(AssetDepreciation assetDepreciation)
    {
        return assetDepreciationMapper.selectAssetDepreciationList(assetDepreciation);
    }

    /**
     * 新增资产折旧数据
     * 
     * @param assetDepreciation 资产折旧数据
     * @return 结果
     */
    @Override
    public int insertAssetDepreciation(AssetDepreciation assetDepreciation)
    {
        return assetDepreciationMapper.insertAssetDepreciation(assetDepreciation);
    }

    /**
     * 修改资产折旧数据
     * 
     * @param assetDepreciation 资产折旧数据
     * @return 结果
     */
    @Override
    public int updateAssetDepreciation(AssetDepreciation assetDepreciation)
    {
        return assetDepreciationMapper.updateAssetDepreciation(assetDepreciation);
    }

    /**
     * 批量删除资产折旧数据
     * 
     * @param ids 需要删除的资产折旧数据主键
     * @return 结果
     */
    @Override
    public int deleteAssetDepreciationByIds(Long[] ids)
    {
        return assetDepreciationMapper.deleteAssetDepreciationByIds(ids);
    }

    /**
     * 删除资产折旧数据信息
     * 
     * @param id 资产折旧数据主键
     * @return 结果
     */
    @Override
    public int deleteAssetDepreciationById(Long id)
    {
        return assetDepreciationMapper.deleteAssetDepreciationById(id);
    }
}
